﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OverallInfo.aspx.cs" Inherits="Fitment.Budget.OverallInfo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <p>
        输入整体信息：<br />
        <asp:Label ID="Label1" runat="server" Text="总预算"></asp:Label>
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <br />
        <asp:Label ID="Label2" runat="server" Text="房间数"></asp:Label>
        <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
        <br />
        <asp:Label ID="Label3" runat="server" Text="门数目"></asp:Label>
        <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
        <br />
        <asp:Label ID="Label4" runat="server" Text="窗数目"></asp:Label>
        <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
        <br />
        <asp:Button ID="Button1" runat="server" Text="下一步" onclick="Button1_Click" />
    </p>
    <p>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:FitmentConnectionString %>" 
            DeleteCommand="DELETE FROM [HouseInfo] WHERE [House_ID] = @House_ID" 
            InsertCommand="INSERT INTO [HouseInfo] ([DoorCount], [WindCount], [RoomCount]) VALUES ( @DoorCount, @WindCount, @RoomCount)" 
            SelectCommand="SELECT * FROM [HouseInfo]" 
            UpdateCommand="UPDATE [HouseInfo] SET [User_ID] = @User_ID, [DoorCount] = @DoorCount, [WindCount] = @WindCount, [RoomCount] = @RoomCount WHERE [House_ID] = @House_ID">
            <DeleteParameters>
                <asp:Parameter Name="House_ID" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="User_ID" Type="Int32" />
                <asp:Parameter Name="DoorCount" Type="Int16" />
                <asp:Parameter Name="WindCount" Type="Int16" />
                <asp:Parameter Name="RoomCount" Type="Int16" />
                <asp:Parameter Name="House_ID" Type="Int32" />
            </UpdateParameters>
            <InsertParameters>
                <asp:ControlParameter ControlID="TextBox3" DefaultValue="0" Name="DoorCount" 
                    PropertyName="Text" Type="Int16" />
                <asp:ControlParameter ControlID="TextBox4" DefaultValue="0" Name="WindCount" 
                    PropertyName="Text" Type="Int16" />
                <asp:ControlParameter ControlID="TextBox2" DefaultValue="0" Name="RoomCount" 
                    PropertyName="Text" Type="Int16" />
            </InsertParameters>
        </asp:SqlDataSource>
    </p>
    </form>
</body>
</html>
